import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import Layout from '../components/Layout.vue'
const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'index',
        component: Layout,
        redirect: '/clinic/list',
        children: [
            {
                path: "/clinic/list",
                component: () => import(/* webpackChunkName: "clinic_list" */ '../views/ClinicView.vue')
            },

            {
                path: "/clinic/add",
                component: () => import(/* webpackChunkName: "clinic_add" */ '../views/ClinicEdit.vue')
            },
            {
                path: "/clinic/edit",
                component: () => import(/* webpackChunkName: "clinic_edit" */ '../views/ClinicEdit.vue')
            },

            {
                path: "clinic/doctor",
                component: () => import(/* webpackChunkName: "clinic_doctor" */ '../views/DoctorView.vue')
            }
        ]
    },
    {
        path:"/charts",
        component: () => import(/* webpackChunkName: "charts" */ '../views/ChartsView.vue')
    },
    {
        path:"/proxy",
        component: () => import(/* webpackChunkName: "proxy" */ '../views/ProxyView.vue')
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
